/**
 * 卡片配置
 * 用户管理 user-manage
 */
const cardConfig = {
  'user-manage': {
    // cardName: '用户管理',
    cardType: 'TableCard',
    cardData: {},
    dataType: 'table',
    moduleBtnList: [
      {
        label: '新增',
        icon: 'el-icon-plus',
        type: 'primary',
        id: 'user-manage-add',
        authId: 'grass-core:user:add'
      },
      {
        label: '导入',
        type: 'primary',
        icon: 'el-icon-upload2',
        id: 'user-manage-import',
        authId: 'grass-core:user:upload'
      },
      {
        label: '导出',
        icon: 'el-icon-download',
        id: 'user-manage-download',
        authId: 'grass-core:user:export',
        downType: 'downloadFile',
        downPath: '/energy-carbon/ecp-admin/userExt/export'
      },
      {
        label: '批量删除',
        type: 'danger',
        plain: true,
        icon: 'el-icon-delete',
        id: 'user-manage-deleteBatch',
        authId: 'grass-core:user:batchDelete'
      },
      {
        label: '已删除用户',
        type: 'default',
        icon: '',
        id: 'user-manage-beDelete',
        authId: 'grass-core:user:search',
        clickConfig: {
          type: 'router-skip',
          routerName: 'UserManageDelete'
        }
      }
    ],
    updateModuleBtn: {
      id: 'user-manage-beDelete',
      labelStr: `已删除用户 <span style="color: #a8a8a8">XXX</span>`,
      path: 'userManage.countDelNum'
    },
    mainClass: 'main-padding20',
    isMultiple: true,
    paginationParams: { page: 1, limit: 10 },
    path: 'userManage.queryPage',
    id: 'user-manage'
  }
}

const treeConfig = {
  'user-manage': {
    // title: '所属机构',
    inputConfig: {
      placeholder: '机构名称'
    },
    inputStyle: { 'padding-top': '20px' },
    dataResolveConfig: {
      id: 'id',
      parentId: 'parentId'
    },
    attrConfig: {
      'node-key': 'id',
      props: {
        children: 'children',
        label: 'deptName',
        value: 'id'
      }
    },
    childrenParams: true,
    defaultExpandedIndex: ['0', '00'],
    path: 'deptTree',
    id: 'user-manage-tree'
  }
}

export default {}
export { cardConfig, treeConfig }
